#include<stdio.h>
typedef struct
{
	char * data;
	int key;
}item;
item array[]={
	{"bill",3},
	{"beil",4},
	{"john",2},{"rick",5},{"neil",4},{"alex",1},{"",1}
};
void sort (item* a,int n)
{
	for(int i=0;i<n-1;i++)
	{
		for(int j=0;j<n-i-1;j++){
			if(a[j].key>a[j+1].key){
				item t=a[j];
				a[j]=a[j+1];
				a[j+1]=t;
			}
		}
	}
	for(int i=0;i<5;i++){
		printf("%s,%d\n",a[i].data,a[i].key); 
	}
}
int main(){
	sort(array,5);
}

